//
//  DTViewController.h
//  us
//
//  Created by karry on 2025/3/29.
//

#import <UIKit/UIKit.h>

#import "UIScrollView+EmptyDataSet.h"
NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger, EmptyDataState) {
    EmptyDataStateLoading,
    EmptyDataStateError,
    EmptyDataStateNoData,
    EmptyDataStateNone
};


@interface DTViewController : UIViewController<DZNEmptyDataSetSource,DZNEmptyDataSetDelegate>

@property (nonatomic, assign) EmptyDataState dataState;

@property (nonatomic, strong) UITableView *us_tableView;

@property (nonatomic, strong) UIActivityIndicatorView *indicator;

@property (nonatomic) BOOL displayEmptySet;

@property (nonatomic, strong) UIBarButtonItem *doneItem;

- (void)doneAction:(id)sender;

/// 供子类调用：发起加载动作（包含 Loading 显示）
- (void)startLoading;

/// 供子类调用：加载成功，隐藏占位视图
- (void)loadingSuccess;

/// 供子类调用：加载失败，展示错误占位
- (void)loadingFailed;

/// 供子类调用：加载完成但无数据
- (void)loadingNoData;

/// 供子类实现：点击“重试”时调用
- (void)loadData;

@end

NS_ASSUME_NONNULL_END
